An OBJECT is a variable which represents a collection of data (like a C 'struct'*) and also represents the procedures which may act upon this data. Structuring programming efforts according to appropriate objects (rather than functions or procedures) is said to improve problem analysis, by more closely modelling the real-world problem of interest. This in turn aids program development, understandability, and maintenance. It is possible to define an object using traditional C syntax, by encapsulating the data and related procedures in a separate source file.
Think C v.4 and C++ extend traditional C by providing new syntax for consistent definition of objects, and by allowing the definition of CLASSES of objects. This promotes the object-oriented programming (OOP) approach, which in turn can lead to more concise and flexible (reusable) code.
This chapter describes the extensions provided by TC and C++, and discusses several programming considerations. C++ provides several additional details for OOP which are not supported by TC. These extensions will NOT be detailed in this text, but are mentioned briefly where relevant and are summarized in Appendix 2.